home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Acao / BlueCustom.swf / scripts / frame_630 / PlaceObject2_345_225 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2008-09-26  |  1.4 KB  |  49 lines

  1. onClipEvent(enterFrame){
  2.    yit = Math.floor(Math.random() * 471) + 30;
  3.    if(this._x < -6000)
  4.    {
  5.       this._x = 5900;
  6.       this._y = _root.depth._y + yit;
  7.       die = 1;
  8.       this.gotoAndPlay(1);
  9.    }
  10.    if(this._x > 6000)
  11.    {
  12.       this._x = -5900;
  13.       this._y = _root.depth._y + yit;
  14.       die = 1;
  15.       this.gotoAndPlay(1);
  16.    }
  17.    this._x += _global.xgo;
  18.    this._y += _global.ygo;
  19.    if(die == 1)
  20.    {
  21.       if(_root.player.eat.hitTest(this.eat))
  22.       {
  23.          die = 0;
  24.          this.gotoAndPlay("die");
  25.          _global.psize = 200;
  26.          _root.player.maxspeed = 20;
  27.          reat22 = new Sound();
  28.          reat22.attachSound("nfxGLIS");
  29.          reat22.start(0,1);
  30.          scoreworth = 200;
  31.          multiplyer = 1;
  32.          if(_root.tools.powerup1._currentframe > 10)
  33.          {
  34.             multiplyer = 2;
  35.          }
  36.          scoreity = Math.round(scoreworth * multiplyer);
  37.          _root.tools.instascore.text = "+" + scoreity;
  38.          _root.tools.instblock._alpha = 0;
  39.          _global.scoreit = _global.scoreit * 1 + scoreity;
  40.          _global.boost += scoreity / 30;
  41.          _global.vincy = 400;
  42.          _root.player.gotoAndStop("invy");
  43.          _root.tools.sidebar1.sidebarflash.gotoAndPlay("yellow");
  44.          _root.tools.sidebar2.sidebarflash.gotoAndPlay("yellow");
  45.          _root.tools.bar1.gotoAndStop(_global.boost + 1);
  46.       }
  47.    }
  48. }
  49.